| Filename | (eval 14)[rbm/lib/RBM.pm:39] |
| Statements | Executed 65 statements in 2.58ms |
| Eval Invoked At | /root/tor-browser-build/rbm/lib/RBM.pm line 39 |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 15 | 1 | 1 | 624µs | 903ms | RBM::__ANON__[:16] |
| 15 | 1 | 1 | 469µs | 891ms | RBM::__ANON__[:10] |
| 1 | 1 | 1 | 13µs | 53µs | RBM::BEGIN@2.7 |
| 1 | 1 | 1 | 9µs | 32µs | RBM::BEGIN@28 |
| 0 | 0 | 0 | 0s | 0s | RBM::__ANON__[:23] |
| 0 | 0 | 0 | 0s | 0s | RBM::__ANON__[:41] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # This part of the file contains options written in perl | ||||
| 2 | 2 | 858µs | 2 | 92µs | # spent 53µs (13+40) within RBM::BEGIN@2.7 which was called:
# once (13µs+40µs) by RBM::load_config_file at line 2 # spent 53µs making 1 call to RBM::BEGIN@2.7
# spent 40µs making 1 call to Exporter::import |
| 3 | ( | ||||
| 4 | var_p => { | ||||
| 5 | # runc100 is true if we are using runc >= 1.0.0 | ||||
| 6 | # we assume that any version that is not 0.1.1 is >= 1.0.0 | ||||
| 7 | # spent 891ms (469µs+891) within RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:10] which was called 15 times, avg 59.4ms/call:
# 15 times (469µs+891ms) by RBM::config_p at line 94 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 59.4ms/call | ||||
| 8 | 15 | 69µs | 15 | 891ms | my ($out) = capture_exec('sudo', 'runc', '--version'); # spent 891ms making 15 calls to IO::CaptureOutput::capture_exec, avg 59.4ms/call |
| 9 | 15 | 446µs | 15 | 86µs | return !($out =~ m/^runc version 0.1.1/); # spent 86µs making 15 calls to RBM::CORE:match, avg 6µs/call |
| 10 | }, | ||||
| 11 | # runc_spec100 is true if runc spec is at least 1.0.0 | ||||
| 12 | # We will need to update this when there is a new spec version available | ||||
| 13 | # spent 903ms (624µs+902) within RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:16] which was called 15 times, avg 60.2ms/call:
# 15 times (624µs+902ms) by RBM::config_p at line 94 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 60.2ms/call | ||||
| 14 | 15 | 108µs | 15 | 902ms | my ($out) = capture_exec('sudo', 'runc', '--version'); # spent 902ms making 15 calls to IO::CaptureOutput::capture_exec, avg 60.1ms/call |
| 15 | 15 | 961µs | 15 | 390µs | return $out =~ m/^.*spec: 1\.[0-9]+\.[0-9]+(?:-dev)?$/m; # spent 390µs making 15 calls to RBM::CORE:match, avg 26µs/call |
| 16 | }, | ||||
| 17 | nightly_torbrowser_version => sub { | ||||
| 18 | state $version = ''; | ||||
| 19 | return $version if $version; | ||||
| 20 | my (undef, undef, undef, $day, $mon, $year) = gmtime; | ||||
| 21 | $version = sprintf("tbb-nightly.%u.%02u.%02u", $year + 1900, $mon + 1, $day); | ||||
| 22 | return $version; | ||||
| 23 | }, | ||||
| 24 | nightly_torbrowser_incremental_from => sub { | ||||
| 25 | my ($project, $options) = @_; | ||||
| 26 | my $nightly_dir = project_config($project, 'basedir', $options) . '/nightly'; | ||||
| 27 | my $current_version = project_config($project, 'var/torbrowser_version', $options); | ||||
| 28 | 2 | 124µs | 2 | 55µs | # spent 32µs (9+23) within RBM::BEGIN@28 which was called:
# once (9µs+23µs) by RBM::load_config_file at line 28 # spent 32µs making 1 call to RBM::BEGIN@28
# spent 23µs making 1 call to Exporter::import |
| 29 | return [] unless -d $nightly_dir; | ||||
| 30 | my @dirs = sort map { $_->basename } path($nightly_dir)->children(qr/^tbb-nightly\./); | ||||
| 31 | my $nb_incr = project_config($project, ['var', 'max_torbrowser_incremental_from'], $options); | ||||
| 32 | my @res; | ||||
| 33 | while ($nb_incr > 0) { | ||||
| 34 | my $dir = pop @dirs; | ||||
| 35 | last unless $dir; | ||||
| 36 | next if $dir eq $current_version; | ||||
| 37 | $nb_incr--; | ||||
| 38 | push @res, $dir; | ||||
| 39 | } | ||||
| 40 | return [@res]; | ||||
| 41 | }, | ||||
| 42 | }, | ||||
| 43 | ) | ||||
| 44 | 1 | 12µs | |||
| 45 | ; |